package ModelLayer;
import java.util.Date;
import java.text.SimpleDateFormat;

/**
 * The class provides information about the DVDs borrowed.
 * 
 * @author () 
 * @version (a version number or a date)
 */
public class Copy
{
    private String serialNumber;
    private Date purchaseDate;
    private double purchasePrice;
    private boolean returned;
    private static final SimpleDateFormat ft = new SimpleDateFormat("yyyy.MM.dd 'at' hh:mm:ss");
    
    public Copy( String serialNumber, double purchasePrice)
    {
        this.serialNumber = serialNumber;
        this.purchaseDate = new Date();
        this.purchasePrice = purchasePrice;
        returned = true;
    }
    
    //Set methods    
    public void setSerialNumber( String newSerialNumb)  {  serialNumber = newSerialNumb; }
    public void setPurchasePrice(double newPurchasePr)  {  purchasePrice = newPurchasePr; }
    public void setReturned(boolean val)                {  returned=val; }
    
    //Get Methods
    public String  getSerialNumber()  {  return serialNumber; }
    public String  getPurchaseDate()  {  return ft.format(purchaseDate).toString(); }
    public double  getPurchasePrice() {  return purchasePrice; }
    public boolean getReturned()      {  return returned; }
}
